package org.zecontech.plantvszombie.api.event;

import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.GoalSelector;

public class PlantVsZombieEvents {

    public static final Event<InitGoal> INIT_GOAL = EventFactory.createArrayBacked(InitGoal.class, callbacks -> (mob, goalSelector, targetSelector) -> {
        for (InitGoal callback : callbacks) {
            callback.initGoal(mob, goalSelector, targetSelector);
        }
    });

    @FunctionalInterface
    public interface InitGoal {
        void initGoal(Mob mob, GoalSelector goalSelector, GoalSelector targetSelector);
    }
}
